import { array } from 'vue-types'

import type { ICreateRoleReq } from '@/apis'

import type RoleDialog from './RoleDialog'

export const roleDialogProps = () => ({
  statusOptions: array<OptionItem>().def([])
})

export const formData = (): ICreateRoleReq => ({
  roleName: '',
  roleKey: '',
  roleSort: 0,
  status: '0',
  menus: [] as string[],
  remark: ''
})

export type IFormData = ICreateRoleReq
export type RoleDialogRef = InstanceType<typeof RoleDialog>
